<%@ page import="javax.naming.Context" %>
<%@ page import="javax.naming.InitialContext" %>
<%@ page import="java.sql.Connection" %>
<%@ page import="com.wuchao.basedao.BaseDao2" %><%--
  Created by IntelliJ IDEA.
  User: 吴超
  Date: 2022/4/20
  Time: 09:35
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <% Context ct=new InitialContext();
        Object lookup = ct.lookup("java:comp/env/t143");
        out.print("我的名字，我最爱"+(String) lookup);
        BaseDao2 baseDao2 = new BaseDao2();
        Connection con=baseDao2.getConnection();
        if(con==null){
            out.print("没连上");
        }else{
            out.print("连上了");
        }
    %>

</body>
</html>
